{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form name="myform" action="" method="post" role="form">	
                <div class="box-header with-border">
                    <span class="fa fa-pencil" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">教师档案添加</p>
                </div>
                <div class="box-body">
				   <div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   姓名：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12">
							   <input type="text" name="staff_name" class="form-control" required="required">
						  </div> 
				    </div>
					<div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   编号：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12">
							   <input type="text" name="staff_number" class="form-control" required="required">
						  </div> 
				    </div>
					<div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   电话：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12">
							   <input type="tel" name="staff_tel" class="form-control" >
						  </div> 
				    </div>

					<div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   身份证：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12">
							   <input type="text" name="staff_card" class="form-control" required="required">
						  </div> 
				    </div>
					<div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   党员：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12">
						  {%foreach from=$party key=key item=value%}
							   <label class="choice"><input type="radio" name="staff_party" value="{%$key%}">{%$value%}</label>
						  {%/foreach%} 
						  </div> 
				    </div>
					{%if $staff_nature !=1%}
					<div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   员工性质：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12">
						  {%foreach from=$nature key=key item=value%}
							   <label class="choice"><input type="radio" name="staff_nature" value="{%$key%}" >{%$value%}</label>
						  {%/foreach%}   
						  </div> 
				    </div>
					{%/if%}
					<div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   性别：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12">
							   <label class="choice"><input type="radio" name="staff_sex" value="1"  checked> 男</label>
							   <label><input type="radio" name="staff_sex" value="0"> 女</label>
						  </div> 
				    </div>
					<div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   职称：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12">
							   <select class="form-control" name="staff_position">
							    {%foreach from=$position key=key item=value%}
                                <option value="{%$key%}">{%$value%}</option>
                                 {%/foreach%} 
                              </select>  
						  </div> 
				    </div>
					<div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   学历：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12">
							   <select class="form-control" name="staff_education">
							   {%foreach from=$education key=key item=value%}
                                <option value="{%$key%}">{%$value%}</option>
                               {%/foreach%}
                              </select>  
						  </div> 
				    </div>
					<div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   出生日期：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12">
							       <input type="text" class="form-control" name="staff_birth"  id="datepicker" />
                                   <div class="input-group-addon">
                                      <i class="fa fa-calendar"></i>
                                  </div>
						  </div> 
				    </div>
					<div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   参加工作时间：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12"> 
								  <input type="text" class="form-control" name="start_time" id="datepicker2" >   
                                  <div class="input-group-addon">
                                      <i class="fa fa-calendar"></i>
                                  </div>
						  </div> 
				    </div>
					<div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   到校工作时间：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12"> 
								  <input type="text" class="form-control" name="end_time" id="datepicker3" >   
                                  <div class="input-group-addon">
                                      <i class="fa fa-calendar"></i>
                                  </div>
						  </div> 
				    </div>
					<!--<div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   相片：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12">
							   <input type="file" value="" accept=".png,.jpg" name="staff_img" class="upfile"/>
						  </div> 
				    </div>-->
					<!--<div class="form-group">
						  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   附件：
						  </label>
						  <div class="input-group col-md-6 col-sm-12 col-xs-12">
							   <input type="file"  name="staff_file" multiple="multiple">
						  </div> 
				    </div>-->
				</div><!--box-body --> 
                <div class="box-footer text-center">
                     <button class="btn btn-primary" type="submit">保 存 信 息</button>
                 </div>
             </form>
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
<!--主要内容结束-->   
{%include file="index.footer.tpl.php"%}
  <script>
  $(function() {
    $( "#datepicker" ).datepicker({
      showOtherMonths: true,
      selectOtherMonths: true,
	  changeMonth: true,
      changeYear: true,
	  yearRange:"1930:2010"
    });
	$( "#datepicker1" ).datepicker({
      showOtherMonths: true,
      selectOtherMonths: true,
	  changeMonth: true,
      changeYear: true
    });
	$( "#datepicker2" ).datepicker({
	  dateFormat:"yy-mm",
      showOtherMonths: true,
      selectOtherMonths: true,
	  changeMonth: true,
      changeYear: true
    });
	$( "#datepicker3" ).datepicker({
	  dateFormat:"yy-mm",
      showOtherMonths: true,
      selectOtherMonths: true,
	  changeMonth: true,
      changeYear: true
    });
  });
  //上传图片
  $(function(){
        var imgurl=[];
        function createfile(){
        $('#updiv').append("<input type='file'  name='photos' class='upfile'>");
        }
        function showimg(url){
            var img='<img src="'+url+'"/>';
            $('#imglist').append(img);
        }
        function addfile(){
            showimg($(this).val());
            $(this).hide();
            createfile();
            $('.upfile').bind('change',addfile);
        }
        $('.upfile').bind('change',addfile);
    })
</script>
